using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Windows.Forms;


namespace RideMe.CommandManagement
{
    public abstract class CommandExecutor
    {
        private Hashtable _hashInstances = new Hashtable();

        public virtual void InstanceAdded(object sender, Command command)
        {
            _hashInstances.Add(sender, command);
        }

        protected Command GetCommandForInstance(object sender)
        {
            return _hashInstances[sender] as Command;
        }

        // Interface for derived classed to implement
        public abstract void Enable(object sender, bool setEnabled);
        public abstract void Check(object sender, bool setChecked);
    }
}
